Write logic refactor.

- No longer have to read whole file into memory in order to update.
- We're not done, yet. This still needs to be tested, and we're still investigating what could be causign the 512-byte error that people are seeing.