Bring Literal#replace under test, and ensure that it works with nested children.
Fix #2. Extract tree traversal from Rule into Traverser.