Fix crash when saving a document that has not used ThymioBlockly
Created by: cwalther
currentSavedXml in that case was an empty string, and passing that to document.setContent() apparently left the QDomDocument in an invalid state that would later crash MainWindow::saveFile().
Add some more error checking for good measure, although I am not currently aware of any circumstance where the error still occurs.
May fix #449 (closed).