Tty resize

Tested on linux and OSX, works just great :)
This was the final touch for full TTY support. It has been made possible thanks to the remote api by @vieux. Thanks! :)