Add an fsync(2) binding for error checking

Once we have finished our writes, we'll call fsync which is the
last opportunity for the kernel to tell us if something has gone
wrong. This may not be necessary with O_DIRECT but it certainly
is with normal buffered I/O.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>