Fix TERM=dumb

Only check ANSI/ECMA-48 capabilities if the terminal is not blacklisted.