Correctly extract the URL from the curl response. Closes #1