Added fix of relative paths in url in `canonicalize_url` method.