Fix guessing of package name and version.

The fix in commit 7f97612 for supporting the package naming used by the
pytz module caused a regression if the package name contained a dash
followed by a number. We fix this by splitting on all dashes followed by
numbers and recreating the package name from all components but the
last.
More robust guessing of package name and version.

Added support for some other package naming schemes.
test guess_pkgname_and_version with one more filename