extract.c: simplify extract_from_tmpfile()