set isTTY to false if TERM is 'dumb'

This is mainly to stop REPLs/logs from sptting ANSI control codes on
terminals which don't support them. (q.v. issue #5344)