Fix issue with string replace methods removing backslashes

Java string replace methods don't properly handle backslashes in the replacement string.
See http://stackoverflow.com/questions/9575116/forward-slash-in-java-regex

Suggestion as of that SO page is to replace backslash with double backslash ("\\" with "\\\\") in the replacement string prior to replacing.

I ran into this because user.home on windows machines is something like C:\Users\NiXXeD, and several of the tests failed for me on a clean repo. I updated the affected tests to reproduce the issue prior to making changes.