Make the blob md5 calculation pure

And add some windows #ifdefs for the fsync stuff