[FIXED JENKINS-3539] Prevent empty file creation if left empty

I used what was done in the other tests. What's the correct pattern here? `Queue.getItem(Task)` is used for the slower machines (still in the queue), and the faster machines need to wait for a second because that method does not return left items.