RFC: Package name regexp as a global constant

Makes it possible to access the regexp as a consenting adult.  This would have been helpful over at the Travis-CI pull request.  With this PR we will at least be able to use this further down the line.

Also, a very small "bonus commit".  Moving a single variable in `clone()` into a tighter scope.