On macOS mktemp returns a temporary directory in a symlink. Nix has a bug where it won't accept path:// located in a symlink. This avoid this issue by always resolving symlinks as returned by TemporaryDirectory.