standardized if test syntax for bash functions

WRT #65 

I've standardized the syntax used to test return codes for the if statements in helper functions. 
woah, you flipped the test here!