util/run_scripts: fixes reference errors; fixes #491
6.1.1; #491