Fixed check for existing tag

We use suffix in relase number to indicate build in a branch. Builds from master have no suffix. When we had package-1.2.3-4h built in branch and was trying to tag package-1.2.3-4 in master the check failed as the new tag was substring of the other tag and grep matches that.