Fix bug with PublicKey string representation

The method was using a wrong name for the key text field.
Fix sqlite database path

Due to moving around of settings the sqlite database has moved
to an unexpected directory.