add --tmp option
simplify text
hm, tempfile is a pretty new invention, probably not portable
use File::Temp for portability
be precise