catch os.Interrupt (ctrl-C) so that the tty state can be restored

catch os.Interrupt (ctrl-C) so that the tty state can be restored before terminating.

On both OSX and Linux a Ctrl-C kills the application and leaves the tty/terminal window with no echo.
This patch catches os.Interrupt so that the application closes cleanly.

Tested on OSX (Yosemite) and Linux (Centos 5.11)