No person shall be excused from attending or testifying or producing evidence of any kind before a grand jury, or before any court, or in any cause or proceeding, criminal or otherwise, based upon or growing out of any alleged violation of the provisions of Sections 97-9-11 through 97-9-23 on the ground or for the reason that the testimony or evidence, documentary or otherwise, required of him may tend to criminate him or subject him to a penalty or forfeiture. But no person shall be prosecuted or subject to any penalty or forfeiture for, or on account of, any transaction, matter, or thing, concerning which he may be required to testify or produce evidence, documentary or otherwise, before the grand jury or court or in any cause or proceeding; provided, that no person so testifying shall be exempt from prosecution or punishment for perjury in so testifying. Any person who shall neglect or refuse to so attend or testify, or to answer any lawful inquiry, or to produce books or other documentary evidence, if in his power to do so, shall be guilty of a misdemeanor and, upon conviction thereof, shall be punished by a fine of not less than one hundred dollars ($100.00) nor more than one thousand dollars ($1,000.00), or by imprisonment for not more than one hundred eighty (180) days, or by both such fine and imprisonment.