Fix file mode for Append_File in Windows