Section 9M. No new bakeries shall be established unless the building plans and equipment proposed to be used have been approved by the local board of health. The board shall refuse a permit for such bakery if the building and equipment do not comply with sections two to six, inclusive, and sections nine F to nine J, inclusive, and rules and regulations made thereunder; provided, that any party in interest may appeal to the department of public health or to the superior court. Said department or court may affirm, reject or modify the findings of the board, and said board shall thereupon proceed in accordance with the order of the court or department.