Any act authorized or required to be done under this Code by any person in the prosecution of his legal remedies may be done by his agent; and for this purpose he is authorized to make an affidavit and execute any bond required, though his agency shall be created by parol. In all such cases, if the principal shall repudiate the act of the agent, the agent, together with his sureties, shall be personally bound.