Make processing2dot more robust and testable