Changes to new replace function

- Added an extra "second" argument.
- Made replace on String Unicode safe.
- Added tests for String.