Section 29. If buildings or other premises are owned by one person and occupied by another under lease or otherwise, the orders of the marshal or head of the fire department shall apply to the occupant alone, except where the rules or orders require the making of additions to or changes in the premises themselves, such as would immediately become real estate and be the property of the owner of the premises. In such cases the rules or orders shall affect the owner and not the occupant; and unless it is otherwise agreed between the owner and the occupant, the occupant whose use of the premises has caused the making of such additions or changes, in addition to his rent or other payments, shall, after the additions or changes are made, pay a reasonable per cent of the cost thereof annually to the owner of the premises. No rule or order shall be made or enforced which requires an expenditure by the owner or occupant of more than five per cent of the last annual assessed valuation of the land and buildings to which such rule or order relates. The provisions of this section shall not apply to any rule or order adopted or issued pursuant to sections thirty?eight B through thirty?eight I.