Some formatting, logic, and speedup improvements(only create the same regexes once).
Fix pylint errors, the `_rvm()` and `_do_rvm()`  were being given `runas` twice because of a badly constructed `command` string.