Bugfix for rewriting of protocol relative URLs

Simple fix for rewrite_relative_url: it wasn't adding the base url's protocol to the relative url