Fix: Only run makeIndexCommand when pdflatex was successful

Otherwise latex errors are silent unless --verbose is used.