refactor to abstract file sanitization for rvm
fix for rbenv
macports fix
don’t check for macports on non-mac machines