added saveAllDocuments() per Freds advice

- all documents are saved before a build.