robuster locating current execution directory

* reverting to more reliable way to get current execution directory
* things like
  `python -c 'import setuptools; execfile("setup.py")' clean --all develop`
  work again
* plus flake8