Fixing bug where data directory wasn't being created propertly