Fix typo (ie vs. eg).
Change config file name.
Make sure the temp file is deleted on exit.
Drop the short hostname.
Rename the generated files.
Add variable for the key size.

The default is 2048 bit.
Clean up commonName setup.
Override CSR details.