The director or any employee of the department of labor and industries may enter any factory, mill, office, workshop, or public or private works at any time for the purpose of gathering facts and statistics as provided by this chapter, and examine into the methods of protection from danger to employees, and the sanitary conditions in and around such buildings and places and make a record thereof, and any owner or occupant of such factory, mill, office or workshop, or public or private works, or his or her agent who refuses to allow an inspector or employee of the department to enter, shall be guilty of a misdemeanor, and, upon conviction thereof, shall be punished by a fine of not less than twenty-five dollars nor more than one hundred dollars, or be imprisoned in the county jail not to exceed ninety days.