Added ability to use envdir from Python.