Ah, you might need to change this part:
* We assume that the image does not exceed the 512 bytes that we have
* allowed for it to have. that would be bad.
Some of those bootloaders are 8192 bytes. Still I don't see why you can't program a byte at a time.