bdeformatfile.py: Flush the mmaped file before closing to fix isses with NFS