Fix bug in junit_run.py.

Not all targets have classes. E.g., targets that aggregate
other targets.

Auditors: pl