Fix logic/clean up repo version script
closes #3998
Merge pull request #4000 from permcody/repo_ver_fix

Fix logic/clean up repo version script