Added the write protect extension, and tests for this.