Fix #10602 and clean up IO code.

To test, try importing and archiving files and then making sure you can view and download them okay, including metadata. Include multi-file image formats, and definitely `data_repo/test_images_good/bruker/wis/` from http://trac.openmicroscopy.org.uk/ome/ticket/10602