correctly handle case changes in resource files for case-insensitive file systems: ensure   case of the output file is exactly the same as the case of the  source file