Section 13. The directors shall be elected annually by the stockholders by ballot, and the president shall be elected annually by and from the board of directors, and the treasurer and the clerk annually by said board. Every director, unless the by-laws otherwise provide, shall be a stockholder. The treasurer may be required to give a bond for the faithful performance of his duty in such sum and with such sureties as the by-laws may prescribe. The clerk, who shall be a resident of the commonwealth, shall be sworn, and shall record all votes of the company in a book kept therefor. The officers of a company shall hold officer for one year and until their successors are qualified. All other agents and officers shall be chosen or appointed, and all vacancies filled, in the manner prescribed by the by-laws, or, in default of such by-law, by the board of directors. Any requirement in the general laws of action to be taken or instruments to be signed by the president, directors, or a majority of the directors, of a company, relative to grants, extensions, alterations, and revocations of location, abolition of grade crossings and rights in state highways, shall be sufficiently and legally complied with if such action is taken by a vote, or if such instrument is executed in accordance with, and by the persons designated in, a vote of the directors of such company, at a meeting duly and properly held, at which a quorum of the board is present.