Fixed premature deferred.resolve() in lib/replace.js

Premature `deferred.resolve()` occurs when passed `config.replaceRequireScript.files` array contains more than one file.
* Added `filesEvaluated` counter to `lib/replace.js`
* Patched associated nodeunit tests.
* Fixed failing unit test on replacedFileContents. Appears to have been a typo on the master branch that never did a `.search()` for the script tag.