Fixing test on darwin.

TempDir on darwin likes to create files in /var (which is a symlink to /private/var) which caused the old comparision to fail when it shouldn't. Instead, we now use os.SameFile to compare the paths.
Formatted with gofmt.
Merge pull request #12 from mkeesey/master

Fix tests on darwin