Force flush of file content in dump

The dump file would be end up corrupted sometimes when working with mitmdump in a VM.  Adding an explicit flush seems to have resolved the file sync issues.
Merge pull request #98 from pplante/master

Explicit file flush in mitmdump