Add handler for replace entry modification.

This fixes #52.