Added validateShellCommand function which determines whether the command exists in the current shell