Unicode fixes.  Fix use of fopen, ifstream and ofstream.