dump all data as a big hash

This is the fix i did for my Issue 3, I think it fixes the latest issue 7 too.

I had this lying around for months, never saw your reply to the issue, sorry.

The change looks bigger than it is because the file open collapses the code. It just avoids this hand-coding of yaml that was happening between the objects which seems to have caused problems.