(a) Accessory buildings. The location of accessory buildings and uses in residential districts must meet the following requirements: (1) Where an accessory building is attached to the main building, a substantial part of one wall of the accessory building shall be an integral part of the main building or such accessory building shall be attached to the main building in a substantial manner by a roof, and therefore such requirements applicable to the main building. (2) Accessory buildings in commercial zones shall not to be closer than five feet to the main building, nor closer than five feet to the lot line. (3) A detached accessory building, not more than two stories in height, may be constructed on not more than 30 percent of the rear yard. (b) Temporary buildings. Temporary buildings used in conjunction with construction work only may be permitted in any district and shall be removed immediately upon completion of construction.