Writing

Eventually we need to remap references within the copied tree, and implement [the test](https://github.com/phpcr/phpcr-api-tests/issues/142#issuecomment-60205178).