Fix tty detection for terminal codes.
Merge pull request #13 from infirit/master

Fix tty detection for terminal codes.