Fix improper string handling

Fixed an improper handling of non-unicode strings in ```FileRef``` in Win32.