Fix url_replace() so that it replaces parsed components with parameters