Export cube collapses to fits files.

Closes #522