Make enter-chroot/unmount-chroot more resilient to shell selection.

Fixes #259.