pyflakes 0.7 compatibility

... and update the tests not to assume a '.db' suffix on the database file.