Use Compilation.getPath instead of replacing regexes manually

Since webpack/webpack#427, the REGEXP properties are no longer exposed on Template, and it is instead expected to call one of the built-in mechanisms for templating an asset path.