Refactoring the way install.sh checks for commands