Fix potential tracebacks when _rbenv_exec() returns False

Fixes #5888.