Write one byte at a time.
This is probably going to kill write speeds when extracting files, but it
fixes the bug with the garbage data at the end of extracted files. Well, that
assumes that all files are sized in bytes (e.g. you can't have a 9 bit file),
which seems reasonable given I know that's true for memory.
Remove looped read.
Turns out, reading a single byte from a file at a time is a stupid solution to
a problem that was already solved. And that I knew was already solved. One of
these days I'll write code I can look back on code and think "Oh, that was a
good idea," but for now, I do stuff like this. *facepalm*