Replace calls to `which` with Python `os` funcs

Note that `os.get_exec_path()` was added in Python v3.2. If we plan to support older versions of Python, the call to `os.get_exec_path()` will need to be replaced with getting the `PATH` environment variable and splitting it by `os.pathsep`.