Quote all uses of $tempfile in scanner scripts