Fix #1292 - Fix file create and write on w32