Added unit and integration tests for the file.replace functions
Merge pull request #7382 from whiteinge/file-replace-tests

Added unit and integration tests for the file.replace functions