When a person to whom a writ of habeas corpus is directed refuses to receive the same, or does not obey and execute it, unless sufficient excuse therefor is shown, such court or magistrate shall compel obedience to the writ and punish the person guilty of the contempt forthwith, by process of attachment as for contempt.
12 V.S.A. § 3976