Fix `is_cwd` for symlinks

Since `pwd` is a resolved symlink, the comparison in `is_cwd` needs to
use the real path, too.