Support for required attributes in dot export.

Still needs some work to better detect optional attributes.