Any provisions of a contract between the owner and the contractor, which reduce or impair the rights and remedies of a subcontractor or which postpone the time for payment by the owner to the contractor for a period exceeding four (4) months after completion of the work, shall be grounds for recision by the subcontractor of his contract with the contractor, unless such subcontractor was given actual notice thereof prior to the time of the making of his contract with the contractor, or the contract or the pertinent provisions thereof were filed in the office of the prothonotary in the time and manner provided by section 402. Such recision shall not impair the right of the subcontractor to recover by lien or otherwise for work completed prior thereto.
49 P.S. § 1406