Check for headless usage before attempting to use swing for errors.
Merge pull request #8 from dickwall/master

Check for headless usage before attempting to use swing for errors.