test sending a command through the pty socket