Pydot test fixes

Catch error when pydot can't be imported because of missing pyparsing.