Bugfix: crash when reading/writing files to paths containing non-ASCII characters on Windows. #651 #865