Compare paths in ctx tests better

Use os.path.relpath when comparing paths.

TMPDIR on OSX refers to a path that is a child of a symlink.  As a
result, the os.chdir() will work, but os.getcwd() will be different
afterwards.

Fixes #68