[Freesurfer] A function to write mgh files from R