Make shell handle ^C/^D gracefully

.. because it's often standard behaviour of shells to quit when ^C/^D is hit.