Fix current build failures.

The test depended too much on terminal capabilities of the testing process.
1) It assumed that string values of terminfo capabilities are the same for all streams. (It turned out that they are not when the test was run inside mock.)
2) It assumed that stdout for tests is always a tty and has all the capabilities. (Thus the test failed if ```-s``` switch was not used and I guess it would fail if the stdout was piped.)