Fix writing/reading cache files in Windows
Fix writing/reading cache files in Windows

(non-ASCII paths)
Use file_* functions when writing files.

ShiftMediaProject/libaacs,mwgoldsmith/aacs,rraptorr/libaacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs,rraptorr/libaacs