Improving gen program, using getopt() and testing it with a trivial script.

XXX. The syntax gives as helper in usage is probably wrong, shall read POSIX
standard.
Modifying gen program to be used for generating test private and public keys.