The revbranchecache code already handled the case when the cache file wasn't writable, but let's add a test as well so future changes don't regress this.