Fix rspec detection code

The rspec detection code was broken when your path included multiple
strings that looked like a version triplet.