Fully implement JSON files.
Expand disk-writing test case.