fix variable name conflict in build.sh and rebuild.sh (p), preventing some images from getting copied to the images directory.  Also adjust a couple of other variable names, to reduce potential for conflicts in the future