Prevent prevent file descriptor leak in ShrinkDebugFile()
Merge pull request #2584 from laanwj/2013_04_shrinkdebugfile_leak

Prevent prevent file descriptor leak in ShrinkDebugFile()