Use ecp_curl internally to actually return the URL
This MR fixes a key failing of the rewrite introduced in !1 (merged), namely that it doesn't actually CURL the requested target URL - the old version did.
So, now internally this script calls out to ecp-curl
with options to store the cookies, which fully replicates the old behaviour.