Have only one call to os.getcwd()
The call to os.getcwd takes quite a long time on Cygwin environment (a
bit less on linux).
It is called from many different places in the python files. Having only
one call to os.getcwd() and storing this to the global module would
speed up execution.