Invert `class_exists()` check to look for new class instead of old. Fixes #688.

looking for the old class causes problems when it didn't exist. @drak Please test before finally merging.
Merge pull request #690 from craigh/Ticket_688

Invert `class_exists()` check to look for new class instead of old.