The laws of costs shall not be interpreted as penal laws; nor shall anything in this article take away or abridge the discretion of a court of equity over the subject of costs, except that in every case in an appellate court costs shall be recovered in such court by the party substantially prevailing.