Print colored output only to a tty

Color output only if standard and error output are ttys.