Fix bug in ROOT_DIR calculation.

Now ROOT_DIR is correct no matter from where it is called. Previously there
were errors when "settings.py" were called from within config directory.