added spec for checking read/write on PTY.spawn