This can happen when $PWD contains a symlink somewhere in the path. In
that case, "cd ..; cat x" could mean something different from "cat ../x".
Notably, this error occurs when running "./do test" if your build
directory is through a symlink. For example, on freebsd your home
directory is /home/$USER, but /home is a symlink to /usr/home, which
triggers this problem.
Not adding tests in this commit, because when I added some tests, I
found even more symlink-related bugs, but those ones are much more
unlikely to occur. The additional fixes+tests are in a later commit.