Fix package version check

Fix #55

Homebrew has encoded formula revision to installation prefix (see https://github.com/Homebrew/homebrew/commit/fbfc6dcffee5e182ade0f917ce3e6509578cc75f#diff-b4a6fcb9de3a9163fd8cdac432ad8270).