Refactoring iif method to test for true/false on $echo instead of 0. Fixes #926