Add sensible check for latexmk and pdflatex