Some plumbing to prepare for model test.
Get write() working.
Ignore swap files.