Call realpath() on result of sys_get_temp_dir()

On OSX the temp dir is within /var, which is a symlink to /private/var.
If this is not resolved, the comparison will fail when comparing to the result of `git archive` in testGitExcludes().
Merge pull request #1752 from njam/issue-1752

Link-resolve tmp dir in tests