In some versions of Python, a different database backend may be selected.
The backend selected may or may not append an extension to the database file.
This patch fixes the implementation and test to work whether a file extension is present
or not. It also moves the test database to a more predictable location and does not
clean it up after the test is run to allow for easier post-test debugging.