fix file descriptor leak

The file to be uploaded is opened, but not closed once the upload is completed.
If you upload multiple files with the same ConcurrentUploader all files remain open and you eventually run out of file descriptors
This change adds a _cleanup function that gets called when work is done that closes the file