Improve dump_attachment documentation.

Fixes ticket #2299