Please... do NOT use the default configuration file. Never.
Your way of getting the configuration file is going to break horrible. Please explain me why. I'm not going to accept you pull until I get an explanation.

Untested but give this a try:

```Python
import sys
import os

def foo():
    print os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__))
```