Close resource leak in temporary file manager.
Merge pull request #730 from mtbc/tempfilemgr-leak

Close resource leak in temporary file manager.