fixed deleted files error

if flag files are deleted during file collection the process would continue
with an invalid list of files and ultimately create an empty archive.
This patch adds an additional check after the file collection that leaves the
script if the list was corrupted by deleted files.