hdu: fix File.WriteHdu for darwin
doc: add example