Avoid read-only errors in p4-revert.
Fixes #49.