flash device script now waits for the latest build file to finish downlo...

...ading.