Adding os.path.realpath to help macos build pass tests.

Tests are failing on mac due to tempdir naming issues.  Solution is to pepper in os.path.realname() in places...