Modify version checker to disregard paths starting with underscores and dangling versions.

I added a test which passes, though a number of tests in this repo are flaky.