There is a problem with the perror logging and exit functions. Add a test
program.
Since it may be necessary to scan through the arguments multiple times,
copy the argument list before each try. The vperror_* functions now
look like they are working correctly.