Fix regexp bug in package name substitution

The generated Makefile.PL is the only place this is used,
but if a package has more than two components it looks a little funny :-)