Prioritize PATH executables over local directories
Prioritize PATH executables over local directories

Right now, when validating an executable, the check to ensure the path
is a file and not a directory comes before the check for executables in
PATH. This means that a sub directory of the current process's PWD will
take priority over an executable in PATH, and so an error will be given
saying that the specified path "is not a file or a symlink", even if
there is a valid executable in PATH which was intended to be executed.

This fix reorders the checks to ensure that the executable in PATH takes
priority over a sub directory of the local PWD.

microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode