Fix #1. Add patch errors based on rfc6902, plus unit test coverage. Add unit test coverage to ensure add behaves like replace for existing paths as per rfc