Fix: Only run makeIndexCommand when pdflatex was successful

Otherwise latex errors are silent unless --verbose is used.
Show tail of latex log on error, so we see it even without --verbose
Disable makeIndexCommand, as it doesn't work on non-windows

Need to refactor execution code and set environment variables to support this.
Use isPrefixOf to prevent line ending problems
Refactor + Also rerun latex when longtable package requires it
Never run latex in interactive mode

Because we show latex errors now, we don't need interactive mode anymore.
Don't log template variables
More elegant but also more verbose way to call latex

Gives the latex output in a string, without requiring to read any files. This method is committed so we can find it in the history, should we need it. Will be reverted immediately.
Revert "More elegant but also more verbose way to call latex"

This reverts commit a3b16036466601086711b5bba03fa471dd8d8f0d.
Add todo
Don't rerun latex if there was an error
Merge pull request #16 from AmpersandTarski/refactor-latex-execution

Refactor latex execution