Fix for #6

Amended checks for permissions and database locations as per issue #6.