Added replace parameter for setText

Requires https://github.com/admc/wd/pull/333 to be pulled first.

I also want to create a test for this in keyboard-specs.js but I can add that in another pull. 

Tested with the wd.js change and it works for me.
Can you add a short comment here explaining why these strings and why they're being formatted in the way they are?

It'd probably be obvious if I weren't new to the project and I realize your reusing a pattern from another piece of code, but regardless the code should be as easy to understand as possible.