Using req.toUrl instead of name when injecting a script.

using req.toUrl(name) instead of just name so that the url for the script alias name is resolved appropriately.