Use fsync in reskindex to ensure file is written to disk
Use fsync in reskindex to ensure file is written to disk

This should (hopefully) resolve occasional errors where the rename step would
fail because the temporary file did not exist. In addition, this also exits with
an error code if something goes wrong so we notice it early, rather than having
to scroll through pages of logs at release time.

matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk