Make DB config work the same everywhere

Closes #52.

Added a helper to `db.js` to build the config object, and rely on that instead of `config-store` which currently only returns objects when config is read from a file.