Use Promises to ensure that every file is rendered before calling done()