It's annoying that LaTeX creates so many auxiliary files and TeXstudio offers no possibility to delete them automatically on program exit.
I also want to use latexmk, since it caches results and therefore builds very quickly, since it doesn't always have to compile everything.
This is a workaround to configure TeXstudio so that latexmk writes to a build directory.