Fix error in REPL term shutdown leaving tty unsane

Previously we did not close the liner term unless a SIGINT or SIGKILL
was received. This left the terminal in raw. Fix that.
Merge pull request #132 from kortschak/repl

Fix error in REPL term shutdown leaving tty unsane