Fixed bug when trying to create the sqlite db, but the directory does not exist.