Fix logic/clean up repo version script

closes #3998 

This script failed to find the base of the repo if you were in the base of the repo.  Also several delimiters have been removed in favor of os.path.join()