add better name of package when guessing when getting an nvr

The better name guessing is actually a direct translation of the brew.parse
python method.

FIXME: This method is actually duplicated from package.rb . Remove duplication
in another time.
Merge pull request #135 from thescouser89/name_guess_fix

add better name of package when guessing when getting an nvr