better error messages on failed db connection

check for file existence and write access
Merge pull request #70 from minrk/db-fail-init

better error messages on failed db connection