Fix check for terminal type.  Fix grep aliases.