Support unicode paths in installed.txt.
The only caveat is it has to be saved as a UTF-8 file or it won't work properly.
Also, make some variables const since they're not changed.
Use a C++ version.
Support more than just UTF-8.
Merge pull request #4172 from thedax/win32Portability

Support UTF-8 paths in installed.txt.