Ensure the database path exists before trying to create a file there
QStandardPath::writeableLocation can return a path that does not exist.
This causes QSql to complain that it cannot create the database. (with
the very unhelpful message "out of memory".) So ensure the path exists
before trying to open the database.
Reviewed By: leinir
Differential Revision: https://phabricator.kde.org/D9954