Allow S3 upload retry logic to function by draining remote to file

For local files, just grab the file name out of the path (poorly-named
getRemote()).

For remote files drain the file over the remoting channel over to a
tempfile on the master, then pass that tempfile into the client, then
delete the file in the finally block.

This allows AmazonS3Client's built in 'ResettableFileInputStream' to
kick in, which it does not when you directly pass a stream in the upload
request.

This only matters when proxying the upload through the master. All other
times, the file really exists on disk and the input stream is a normal
FileInputStream.
Merge pull request #29 from schrodinger/upload-via-filename

Upload files via filename to AmazonS3Client