Re #9355. Move computation of what output filename will be.

Putting it before the algorithm call gives us a better chance of getting
it right if the algorithm runs over midnight.
Merge branch 'bugfix/9355_calibraterectangulardetectors_date' into develop