Wait for async processing to finish

Fixes some files not being converted
Merge pull request #2 from kanongil/promise-fix

Wait for async processing to finish