Adds File::replaceText().

Added File::replace()

Searches for a given text and replaces the text if found

Renamed File::replace() to File::replaceText()

Updated the replaceText() method to utilize File Locking

Updated File::replaceText()

1. Method now checks if the lock is not identical to null
2. Since the method uses File::read() to get the contents of the file,
there is no need for a temporary file. Removed the temporary file
creation

File::replaceText() update

Opening file with r+ mode
Fixes last items for #1665.

- Changes double quotes to single quotes.
- Documents and tests array-based string replace.
- Rewrites test case.

Rewrites the test case because the tests didn't work as well as
they should be. The test file copied itself to the tmp directory,
did some string replace stuff on it and then loaded the data to
test its contents. However in those contents were also the
expectations, so assertContains() would always see the string in
the file... even if the replacing didn't work.

Closes #1665.
Merge pull request #1665 from rooseveltrp/2.5

Added a method File::replace() to the File Utilities.