Ensure the path has a trailing slash
Raise an exception if a cURL error occures