The proceeds of any bonds issued by a school district shall be placed in the county or municipal treasury or depository, as the case may be, if there be one, as a special fund, and shall be used for no other purpose than that for which such bonds were authorized to be issued. If the school board of the school district or any member thereof, or any other officer, shall wilfully divert or aid or assist in diverting any such fund, or any part thereof, to any purpose other than that for which such bonds were authorized to be issued, then such person shall be guilty of a felony and, upon conviction, shall be punished by imprisonment in the state penitentiary for a term not exceeding five (5) years. In addition, he shall be liable personally and on his official bond for the amount so diverted. Any member of such school board may escape the penalty provided for above by requesting and having his vote recorded in the negative on any illegal diversion of the proceeds of such bonds. Nothing contained in this section shall be construed to prevent the payment or rebate of a portion of the earnings derived from the investment of the bond proceeds to the federal government to the extent required by the federal laws applicable to such bonds or the interest income thereon in order to maintain their tax exempt status.