The selectmen of each town, except those having cities with coextensive boundaries within their limits, which cities have an officer with similar duties to those of a tree warden who in fact assumes control of all the territory embraced within their limits, and the warden or burgesses of each borough shall, within thirty days of their election, appoint a town or borough tree warden, as the case may be. Such tree wardens shall be appointed for the term of two years and until their successors are appointed and have qualified. Any tree warden may appoint such number of deputy tree wardens as said warden deems expedient and said warden may, at any time, remove any such deputy tree warden from office. A town or borough tree warden and such warden’s deputies shall receive for their services such reasonable compensation, from the town or borough, as the town or borough may determine or, in default of such determination, as the selectmen or borough warden prescribes.