When processing index.js files, use the parent directory name as the module name.

Many 'require' implementations map 'index.js' files to their parent directory name when mapping script files to module names. Examples include Node.js and Webpack (http://webpack.github.io/). If there is demand, this could be made configurable. I think Dojo defaults this to 'main.js', but most people use 'index.js' these days.

When visiting Script nodes, this patch maps 'index.js' filenames to the containing directory. It also maps 'require' call expressions containing ".." to the parent directory (unchanged). That way, the Closure Compiler resolves modules relative to the entry file the same way Node.js and Webpack do.

It's pretty easy to find users that expect the compiler to do this transformation. Example:

http://stackoverflow.com/questions/25370995/closure-compiler-required-entry-point-never-provided