Use a for-loop for different endings
Check tarball content's root-dir for version

If a tarball doesn't include a version number in it's filename, it is
worth checking it's contents. If the tarball has a root-directory, it is
usually named $BASENAME-$VERSION.
Merge pull request #1 from saschpe/master-verfromtopdir

Check tarball content's root-dir for version