Add close() and tests for ChunkedFileWrapper
Hack up upload retry support in client