The moneys levied and collected for the repair and improvement of highways, including sluices, culverts and bridges having a span of less than five feet and boardwalks or renewals thereof, the moneys received from the state, as provided by sections two hundred seventy-nine and two hundred eighty-two, and such other moneys as the town board, by resolution, shall have transferred pursuant to section one hundred thirteen of the town law or pursuant to section two hundred eighty-five-a of this chapter shall be expended for the repair and improvement of such highways, sluices, culverts, and bridges and walks, at such places and in such manner as may be agreed upon by the town board and the town superintendent of highways. Such agreement shall be written and signed in duplicate by a majority of the members of the town board, and by the town superintendent, before the same shall take effect. One of such duplicates shall be filed in the office of the town clerk and one in the office of the county superintendent. Such moneys shall be paid out by the supervisor on vouchers approved by the town superintendent in accordance with such written agreement.
The town board and town superintendent may also appropriate from such moneys such a sum of money as they deem proper for the construction or repair of any public road, walk, place or avenue upon any sand beach separated by more than two miles of water from the main body of the town or on any island or part of an island in the town, although such road, walk, place or avenue is narrower than the width of highways required by statute, but the construction or repair of any such road, walk, place or avenue with such moneys on any such beach or on any such island or part of an island shall not be construed as imposing any liability upon the town or upon the superintendent of highways for any injury to person or property happening thereon.