Re-enable fd/goroutine debug in CmdInfo
Make sure ptmx get closed. Fix leaking goroutine in tty mode
Add unit test for tty mode
Merge pull request #343 from dotcloud/pty_fix-2

Pty fix 2