Fix DATABASES key error
Base dir fix