Prevent wrapped function replacement in wd

Use a local reference to wrapped functions in PromisedWebDriver to prevent
the original function from being replaced during context updates.

Fixes #126
Update chai dependency to 1.9.0

Fixes #84