When a temporary mandate has been issued and directed to any inferior tribunal, corporation, board or person upon whom the writ has been personally served and such tribunal, corporation, board, or person has without just excuse, refused or neglected to obey the same, the court may, upon motion, impose a fine not exceeding one thousand dollars. In case of persistence in a refusal or disobedience, the court may order the party to be imprisoned until the writ is obeyed, and may make any orders necessary and proper for the complete enforcement of the writ.