Explicitly close body in upload part task

Fixes test fails on windows, where it's erroring because
"the file is being used by another process".