Raise error if unable to write FITS file from _generator
Add several new tests of ImageFileCollection