Fix file.replace bug when replacement str is numeric
Add unit test for #9097
Merge pull request #9101 from terminalmage/issue9097

Fix file.replace bug when replacement str is numeric