Fixed so getCurrentState returns initialState if state is not set

Signed-off-by: Frode Marton Meling <fm@saltship.com>
Added console, generatePDF and a new toDot function

This is not ready for merging. Still more tests are needed and the Shell needs option parser and error checking

Signed-off-by: Frode Marton Meling <fm@saltship.com>