Fix BoundsError when opening SQLiteDB.

Calling expanduser on an empty string throws BoundsErrors so check for empty
strings before using it.