fix order of operations when getting rvm_ruby_string

fixes https://github.com/wayneeseguin/rvm/issues/2529
safer version lookup

see https://github.com/wayneeseguin/rvm/pull/2530#issuecomment-31909954
Merge pull request #2530 from ghiculescu/master

fix order of operations when getting rvm_ruby_string