Fix bash if test to be safer

This will solve an issue like :" line 11: [: =: unary operator expected" in the case one of the operators are empty or missing.
Merge pull request #16 from mat-mo/master

Fix bash if test to be safer