Delete working dir only if there was no error in latexmk