fix null elements with attributes

*null* elements with attributes were being generated as

<element a="one" b="two"></element>

This patch is an attempt to make them come out more like:

<element a="one" b="two"/>
remove some whitespace
Merge pull request #13 from heytrav/master

fix null elements with attributes