(Adds missing fixes from new junit test integration test,  https://rbcommons.com/s/twitter/r/1161/)
Sync of https://github.com/pantsbuild/pants/commit/dead243de22e649b69f460f8e9dbe63ea8fa4348