genpatch was also depending on the new files being listed first by
'cvs diff' (which is the case but I'm not sure there is any hard
guarantee).
Use 'perl -w' for more checking, fix the resulting 'undefined value'
warnings. In many cases we don't just want $options{xxx} to exist, we
want it to be defined.
Restrict the scope of variables and remove unneeded variables.