Fix #501: Wait for rootfs image
Created by: ollieparanoid
Unfortunately I can reproduce this on purpose. But this makes it more robust and doesn't break it, and should fix it in theory. We have applied a similar patch for #475 (closed) after trying out various other things. Please review the code and test.