Git-ignore .bak files.
Make the SQL query work with sqlite databases.

The fallback query does not use the CHAR_LENGTH function, but uses LENGTH.