Fixed problem of missing parent directories in database.