Whenever necessary in the creation of a detour as aforesaid, the county commissioners responsible for laying out the detour may enter into an agreement with the owners of private lands covering the acquisition of right of way privileges over private property for the period when the main highway shall be closed to traffic. In the exercise of the rights conferred by this section, the county commissioners responsible may pay for the necessary maintenance, subsequent repair and land rental out of such funds as are available for the construction and maintenance of the roads in their charge.
16 P.S. § 2776