Print exception instead of "KeyboardInterrupt"

Whenever a KeyboardInterrupt exception occurs in the shell, we should
print the actual exception instead of the string "KeyboardInterrupt".
This is needed to support exceptions inherited from KeyboardInterrupt.