SCUBA2: write existing Group file into flag file if it exists

In the case that an observation has ended without a flag file being
created, the pipeline now writes the name of the existing Group file
if present so that a point solution may still be found.