Fix for Issue #23 and more

updateLogs parses the log for the character '!'. However some warnings
also produce an '!' in the LaTeX log output.
Only checking for the response.errors.length makes sure that the pdf is
displayed if warnings occur.

This pull request fixes also a bug in the saveDocument routine.