No need to look at the run folder name. Eliminating this option from the code will considerably simplify the logic an the code.
It will also mean that run is not going to be considered as properly 'seen' by the staging daemon without {r,R}unParameters.xml file present.