Implemented replace for path atoms.