General-purpose script for running batches of programs, looping over multiple values of various command-line parameters