write_mrs function

Write MRS data object to file.