Fix for error "Could not find part: content" on `versal upload`.

Fix for the concurrency bug, when `end` event fires before the stream finished writing gadget bundle. That happens for larger gadgets.