To be clear: I'm now using this modified version and it flashes the firmware without a problem.
Strange limitation for transfer_size on macOS
Add timeout parameter for read/write operations