When, by reason of fire or other casualty, the prisoners in any jail are exposed to danger, the keeper may remove them to some safe place to avoid such danger.