Updated to work with 3.7 and 64 bit ruby

Refactor command selector and isolate the code to determine executable in one place.
Just seems like a lot of wasted space. Could be why we indent it to two spaces.