Fix logic for finding the beta version number
* autogen.sh: Check if $tmp is empty after each assignment.
This fixes the problem that due to the gpg4win-5.0.0-beta103 tag
./autogen.sh --find-version gpg4win 5 0 0 erroneously outputs version
5.0.0 instead of 5.0.0-betaNNN.