Fix if condition checks.

|| and && don't work the way one would expect. Use -a and -o
instead.