make shell script more robust to missing files

e.g. cmti in 4.00.1