Fixed some if/else/elif goodness

Looks like there were some typos in there. Just needed some tweaks to get it to work in Bash on Ubuntu 12.04LTS