Can you supply a log with -vvvvv as parameters to avrdude as well as the binary you are programming?
I am not accepting this patch as-is because (more or less) randomly resetting programmers is usually not the solution to the problem. In fact, the code is commented with a TODO, which already states what has to be done: /* TODO sync write */.
This means the flush part of write_flush() has to be called.

I've attached a patch (against r1248) implementing this TODO. Could you please try it and report back if they work (apply with -p1)?