Every officer and guard at any prison has the power of a policeman and may arrest any person who intrudes upon the premises or makes a disturbance near the prison and take him before any magistrate of the county, by whom he may be fined $10 and the costs.