python3 rbenv support

python3 doesn't seem to like comparing the binary data from communicate()[0] with a string (the non-compatibility of strings vs. binary data (bytes) was one of the big changes from version 2 to version 3 in python as I recall), so I've changed the empty string literals to empty binary data literals... I think that should do what is expected (but I don't have rvm installed these days, so someone with rvm should check if this still works for them). And to avoid shelling out just to set the current directory, I've changed the popen call to use the cwd parameter for setting the working directory, and am passing the command a list of strings rather than command and parameters as one big argument for the shell to parse.