Improve waiting for import/export jobs to finish in behat