Correct arguments for 'replaceWith' callback

Ensure that when `replaceWith` is invoked with a function, that function
is invoked with both the iteration index *and* element.
Merge pull request #410 from jugglinmike/replacewith-args

Correct arguments for 'replaceWith' callback