Improved DOT print

Resend pull request for #7.
Dependency to commons-lang has been removed. Please take a review, thank you!