Fix unknown host exception in junit xml listener.

Fixes #1506 
REview by @eed3si9n