cache uploaded files to uniquely named tmp files

and delete master upload file
http_url_encode: release CURL handle when finished

memory leak plugged