Ensure atomicity for lastsync file
This should take care of having empty lastsync files being served. Possible cause is that the IO is stuck thus taking several seconds to write the lastsync timestamp. This causes mirrors to download the empty file which causes checks to fail.