fixed up use of == to test for string equality rather than .equals().

Almost-certainly incorrect use of ==.  Run and passed the small number of existing tests, but didn't write any more tests as this is legacy...