Use libcurl instead of curl command for downloading
Previous implementation used for simplifications for downloading curl command. This instead implements download using libcurl.
Previous implementation used for simplifications for downloading curl command. This instead implements download using libcurl.