BUG: convert replacement tuples to lists

This fixes a bug that makes it appear as if replace is incorrectly using
regular expressions.
Merge pull request #5145 from cpcloud/replace-exact-fix

BUG: allow tuples in recursive call to replace