Added check for ansi colors if stdout is tty.

Fixes #163