Added logic to close files after they're uploaded to Glacier.

Files that are opened by some of the Glacier methods are not being closed after they have been uploaded.  This patch should fix that.