test: Fixed test-tty failing on Jenkins (Unix).

Modifed the test to use pseudo-tty instead of terminal.
The reason is that Jenkins does not allocate terminal when communicating
with slaves (running the build).