add simple support to export buffers to disk.
Merge pull request #283 from urkle/export_buffer

add simple support to export buffers to disk.