fdatasync

This pull request includes `fdatasync()` changes from @tv42. These changes ensure that pages are written and sync'd before writing the meta page.