The owner of any building who permits the same to remain in any street or public way longer than the time stated in the permit shall be guilty of a misdemeanor of the fourth degree. Each twenty-four hours that the same may be continued shall constitite a new offense, and the building shall be deemed a nuisance.