Fix failing test cases and add missing classname.

Also make pj() not output when debug is off. This makes it work like
other debugging functions (pr, debug, stackTrace)

Refs #4791