fix #11371: adjust script delete to target specific script file name (rebased onto develop)



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

----

fixes https://trac.openmicroscopy.org.uk/ome/ticket/11371 :  try the python commands given there.