Only colorize strings when printing to a TTY

If the output is getting redirected to a file, we don't want to muddy the output with ANSI escape codes.