Handle failure cases in rvm module

Fixes potential tracebacks when _rvm() and _rvm_do() fail. Fixes #5889.
Merge pull request #5895 from terminalmage/issue5889

Handle failure cases in rvm module