Trim tailing whitespace
Change path of curl executable
Return status code for HTTPS request correctly