Ensure files opened for writing are appended to on Windows