Section 18. Any affidavit required in any action or proceeding pending in any court in the commonwealth may be made and sworn to before a clerk or assistant clerk of such court.