Do a switcheroo with newlines to deal with line-breaked urls.

Basically we mark the newlines with the ESC character, then delete that
with any subsequent spaces to eliminate the extra characters between
conjoined url parts.

Also, strip '"' characters in the input with sed(1), and remove the
tr(1) calls from inside the loop.