Fixed the command exists check to look for return value of 2.

This is to make sure that the command comparison check is absolute.
Otherwise, if you define a command TestCommandExtra first followed by
TestCommand, then the exists check will return 1 for 2nd command as its
a partial match. So the 2nd command will not get defined.
So we need an exact match which is done by checking for value = 2.