Added a check for tcsetattr, as the man page tells us that a successful
call only indicates one successful change.