fix os.path.realpath + temp_working_dir comparison

This works around an OS X.8 issue where os.path.realpath(d) resolves to
a different dir than d when d = tempfile.mkdtemp()

This PR supersedes https://github.com/hashdist/hashdist/pull/105