tmp.file have responsibility to close file, not only unlink file

Fixes #28