Resolves relative paths of URLs from Javascript.