use TempFSFile::factory to crate temp file

use TempFSFile::factory to create temp files
so they get cleaned up even if execution fails.

Change-Id: Ib19deccfa3f794676b25c0a52e9077508beeb472