Make Rhino safe

We are still running the r.js optimizer in Rhino, unfortunately.  These changes allow the builder to work under rhino again without throwing errors.  I don't have enough time or java knowledge to fully implement the siteRoot and isWindows support, but it gets us by and maybe informs a more full fledged fix.