Handle permission failures when writing .json files.
Handle `file` in `#%require`.