fix lots of shell syntax
more robust rbenv linking