set isTTY to false if TERM is 'dumb'

This is to stop REPLs/logs from spitting ANSI control codes on terminals which don't support them. (issue #5344)

I'm not sure if this is the best approach (I'm new to node), but it does the job for me.