sh: wrote a function for checking if a command is available
sh: rewrote the PrefixPATH function