When any person shall be convicted of an offense and an appeal shall be taken to the supreme court, the sheriff shall, on an order for that purpose from the judge of the court where he was tried, or a judge of the supreme court, deliver such convict to the sheriff of the county where the supreme court is held, at the term thereof to which the appeal shall be made returnable, who shall safely keep such prisoner, subject to the order of the supreme court.