Fixes test failures reported in #80.

You might want to merge this. It should work everywhere unless the user running
the tests has an insanely large cwd. It's better than the hack I linked to
in issue #80...