Correct handling of first-time document builds.

Signed-off-by: yrammos <yannis.rammos@me.com>
Improve error message regarding the LaTeX log.

Signed-off-by: yrammos <yannis.rammos@me.com>
Really fix LaTeX log file handling.

Signed-off-by: yrammos <yannis.rammos@me.com>