Fixing bug for 'db' directory creation