Any person or corporation who shall violate any of the provisions of this chapter or fail to comply therewith or with any of the requirements thereof, or who shall build or alter any building in violation of any detailed statement of plan submitted and approved hereunder, shall be guilty of an offense punishable by a fine not exceeding $50 or imprisonment for a period not to exceed six months, or both. However, for the purpose of conferring jurisdiction upon courts and judicial officers generally, violations of this chapter shall be deemed misdemeanors and for such purposes only all provisions of law relating to misdemeanors shall apply to such violations. Each week's continued violation shall constitute a separate additional violation. The owner or owners of any building or premises or part thereof where anything in violation of this chapter shall be placed or shall exist, and any architect, builder, constructor, agent, person or corporation employed in connection therewith and who may have assisted in the commission of any such violation, shall each be guilty of a separate offense and, upon conviction thereof, shall be fined or penalized as herein provided.