Added testPdflatex to check pdflatex exists