Call `setRawMode` before destroying the socket.

`process.stdin` has a default `end` event handler that automatically calls
`.end()` at the end of the current tick. This prematurely removes the handle
associated with the `stdin` stream, which causes `setRawMode` to throw a
`TypeError` when the socket's `close` event is triggered on the next tick.
Merge pull request #3 from kitcambridge/destroyed-stdin

Call `setRawMode` before destroying the socket.