Fix for Issue #2470 - gem version string processing

This fix assumes that no sane gem version has spaces in it, so when one like that is encountered, it will get truncated at the first space.