bool hasTerminal

Returns true if there is a terminal attached to stdout.