Guard against interrupted system call in cmdconnect.copySSHData.

This was previously done only for the select call, not the
read/writes.
This fixes the a bug with osx iterm2 window resizing killing
cmdconnect ssh sessions.