add todot method

generates dot file (graphviz) for graphic representation of state
machine.
Merge pull request #6 from lipp/add-dotfile-generation

add todot method