On unix, `term::stdout()` just reads the `TERM` environment variable to decide what features are available. It does not check if the output file descriptor is in fact a tty. This resulted in printing escape codes when redirecting output.
fixes #978