Use some more modern constants for some options. Use new MKDIR option which attempts another CWD if MKDIR fails (see libcurl docs). Cleanup the easy handle before throwing away lists that it uses.