Modified commonrc to use new TTY checker to determine TERM