This commit adds a `revertFile()` method to `FileWriter`, which can revert a transformed file (and its backup - if any) written by the `FileWriter`. In a subsequent commit, this will be used to allow ngcc to recover when a worker process crashes in the middle of processing a task. PR Close #36626