Fix newline bug in rewrite_scripts

Newlines in server url_root...that sucks.