When prepayment for costs shall be made with a clerk, he shall certify the fact on the transcript of the record, and immediately pay the costs of the court reporter. When the case shall be determined, if costs be adjudged against the appellant, the clerk shall pay the remaining costs out of the money so deposited, and shall deliver the residue of the money, or all of it if costs be not adjudged against such party, to the party entitled to it; and for any failure thereof he shall be liable to be dealt with by the Supreme Court, or the court of which he is clerk, for a contempt.