Fix use of xor in compare checks

Strange that these parentheses are necessary for xor... I will have to
look up xor and read about perl's implementation more.