Fix potential file descriptor leak when using TmpFile classes