New save output

Saving diffraction intensities into different file formats
This should probably be a private function and from the name I did not expect this to be doing input validation.