Check really if filename is accessible in PATH

* Do the check by spawning a large bash call, more accurate than checking
  os.environ from the parent process which has an old environment.
Merge remote-tracking branch 'upstream/master' into fix-typo-setup-py