fixes #6148 - exit cleanly when EOF/ctrl+d given in shell
Merge pull request #121 from domcleal/6148-shell-eof-exit

fixes #6148 - exit cleanly when EOF/ctrl+d given in shell