getcwd is too clever

After chroot, one needs to move into the new hierarchy before getcwd
returns meaningful answers again.