Improved update-clones.sh to work with more environments.