use portal_url for url variables

@ninfaj we should use the portal_url for portalurl and themeurl not the path.

The path is not an url. Also it can cause problem because the path and url mustn't be the same and you get a 404
Maybe you can add here something like:
"To avoid problems with cached urls, we've added the portal_url into the cachekey."
So it's easier to remember why we did this