Section 25. If a captain of police in Boston or marshal or chief of police in any other city or town in the commonwealth finds that access to any building, apartment or place which he has reasonable cause to believe is resorted to for the purpose of unlawful gaming is barred by any obstruction, such as a door, window, shutter, screen, bar or grating of unusual strength, other than what is usual in ordinary places of business, or any unnecessary number of doors, windows or obstructions, he shall order the same removed by the owner or agent of the building where such obstruction exists, and if any of said officers cannot find either of the persons mentioned, so as to make personal service, said notice shall be posted upon the outside of the apartments and on the outside of said building, and upon the neglect to remove such obstruction for seven days from the date of said order or posting of said notices, any of said officers shall cause such obstruction to be removed from such building, and the expense of such removal shall be a lien on said building and be collected by the officer removing such obstruction, in the manner in which a mechanic's lien is collected.