If the owner or builder erecting any new building, upon notice from the inspector, shall fail or refuse to comply with the terms of the notice by correcting the defects pointed out in such notice so as to make such building comply with the law as regards new buildings, he shall be guilty of a misdemeanor and shall be fined not exceeding fifty dollars. Every twenty days during which any defect in the building is wilfully allowed to remain, after notice from the inspector, shall constitute a separate and distinct offense.