Test for truthiness instead of '0' or '1'

It's not usually appropriate to test a Perl predicate to see if it returns exactly `0` or `1`.  In particular, Perl's definitive false value is the empty string `''`, and functions that return the result of a boolean operation don't reliably return `0` unless they take pains to coerce the boolean into an int.  These tests check for the correct return values.