vectorize urlEncodePath. fixes #7

This fixes the problem with having mutiple scripts/styles in a dependency. I have tested it with a limited number of examples and it seems to work well.