Fixed os.getcwdu code for Python 3 compatibility

This is building on changes that @takluyver already made.  I changed out
instances of getcwdu with our Python version specific core.getcwd.  I
also added some very basic unit tests for those changes.
Did you create a new `test.support` module? I think you forgot to add it.  It's probably worth amending the commit for it. If you rebase onto `upstream/master` it should make that merge commit go away; it's likely that you started work on it before that PR was merged.  Thanks Paul!