futility: updater: refactor: unify getting temp files for firmware images

Unify "create a temp file and write firmware image contents" to the
new API get_firmware_image_temp_file with better error messages.

BRANCH=none
BUG=chromium:1024401
TEST=make clean && make runtests

Change-Id: I441f24053a8d94def587cf8270c44a4bdce9a4fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1928359
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Auto-Submit: Hung-Te Lin <hungte@chromium.org>
3 files changed