improved external scripts.
improved diff regex.
adjusted gloss_env.sh.