only enable colors when output to a terminal (not to a file)
Merge pull request #1458 from remicollet/issue-colors2

only enable colors when output to a terminal (not to a file)