Add check for tmux command existence
Add a command existence check for brew
Add a /bin/sh shebang
Organize installation script into functions