Don't enable_echo when we don't have a tty

The following termios calls will fail (and unnecessarily).

Change-Id: I261ac4bbb6eac29df02bdd458aa65322ad81f316
Closes-bug: #1243845