pulling string case fix from upstream

This fixes a problem with addScriptToIndex,
the files would be generated with String.toLowerCase(); but the paths were not treated the same
when added to the index files.