sql escaping and other fixes: sqliteDB.js