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.