Removes ending semicolons from SQL queries. Fixes #147