Fix a bug where errors.txt could not be created because the assets generation directory was removed just prior.
While for the purpose of errors.txt it WAS being created, we did so asynchronously, and the code to delete slipped in between directory creation and writing the file. Solution: use synchronous version of mkdirp instead.