Section 5. In all cases where the parties have not agreed upon the amount of damages claimed, or where, by reason of the absence or legal incapacity of the owner or owners, no such agreement can be made for the lands, property or materials to be taken, occupied or injured, the municipal corporation may tender sufficient security to the party claiming or entitled to any damages, or to the attorney or agent of any person absent, or to the agent or other officers of a corporation, or to the guardian or committee of any one under legal incapacity, the condition of which shall be that the said municipal corporation shall pay or cause to be paid, such amount of damages as the party shall be entitled to receive, after the same shall have been agreed upon by the parties, or assessed in the manner provided for by this act. In case the party or parties claiming damages refuse or do not accept the security so tendered, the said municipal corporation shall then give the party, his or their agent, attorney, guardian or committee, a written notice of the time when the same will be presented for filing in the court, and thereafter the said municipal corporation may present said security to the court of common pleas of the county where the lands or other property are situated, and, if approved, the security shall be filed in said court for the benefit of those interested, and recovery may be had thereon for the amount of damages assessed, if the same be not paid, or cannot be made by execution on the judgment in the issue formed to try the question, and upon the approval of said security said municipal corporation may proceed with the improvement.