add functions to copy remote database to local file

copyRemoteDB calls createLocalDB and copyRemoteRows to generate a
local sqlite db and copy entries from a remote Postgres db.

Closes #1