Disconcertingly, flush() after each fwrite() appears to make it work.  Something is wrotten somewhere...
Sanity-check .dsk and .nib image raw byte sizes