Added pydot compatilibity, closes #307