Before opening any street or sidewalk, whether it is improved or not, a permit shall be obtained from the office of the Mayor. A deposit may be required or a written agreement between the town and the applicant shall be executed whereby the applicant agrees to restore the surface to its original condition or equal upon completion of his work requiring the opening.