Refactor of db_store tests.

* Handle setup and teardown inside class.
* Rename file to match module.
* Use a tempfile rather than a hardoced file.
Separately test operations on unencrypted DB.