Instead of trying to escape the string a second time use srun as
interpreter of the script.
Not sure if this will cause srun to run properly or if it will instead
run as bash. This will need testing with multiple nodes which was why we
used srun in the first place.