Closing the temporary file before notifying about upload completion.
(fixes a race condtion).
Merge pull request #240 from artemharutyunyan/develop

Closing the temporary file before notifying about upload completion.

This fixes issues on some networked filesystems that prevent concurrent read/write access (xrootd was where this was discovered).