Fix for #1313: Set TERM to "dumb"

Sets the TERM environment variable to "dumb" to suppress ANSI sequences. Tested with the case described in #1313.