Make sure done() isn't called prematurely in the addtextdomain task.

Moves the async loop outside of the loop that determines if files
delcared in the config are valid so the done() method will only be
called when the task has finished.