Change path for tmpmaster.graphviz in the LaTex package

We use the graphviz LaTeX package to generate a lot of graphs in github project for a book on circuits. We currently use

\usepackage[singlefile, pdf]{graphviz}

However this generates .dot and .pdf files for every graph in the book and places them in the top folder of the project, which is less then ideal, because it makes the top folder github “spamed” with those files.

Is it possible to tell graphviz some directory, where it should write all those files into?

Graphviz itself allows controlling the output directory in a straightforward way:

dot -Tpdf -o /my/output/dir/foo.pdf

I do not know how to instruct the LaTeX package to use these options though.

Ideally all this should be captured in the LaTeX build automatically, because this is what executed graphviz

Isn’t this something the LaTeX community needs to handle? If there is something the Graphviz people can provide to help, let us know.