Refactor perlmodlib.PL to use regen_lib.pl and avoid FindBin.

Instead of using FindBin, pass a directory to use on the command line.
Use regen_lib for handling the output file.
die if any file opened for reading has errors on closing.
Run with the cwd as the top level of the distribution, instead of pod/