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.

**To reproduce the issue**: Use `rc` under Node v0.10 to connect to a socket, then attempt to end the transmission by pressing `Ctrl + D`. The command currently exits with a `TypeError`: `Cannot call method 'setRawMode' of null`.