Don't add getcwdu back to os module

This defines getcwdu locally rather than storing it in the `os` module, if it is not defined (i.e. on Python 3). IPython uses path.py, and this was masking problems with our code on Python 3.