Improve customization of training_setup.sh script (rebased onto develop)



This is the same as gh-2603 but rebased onto develop.

----

This is a quick fix PR addressing the comments in https://github.com/openmicroscopy/openmicroscopy/pull/2594#discussion_r13640525.

To test this PR, check the merge-integration/merge-training job still run as expected.