Browser tests (wd, promises version)

Functional tests using [wd](https://github.com/admc/wd/) using promises.

I don't much like the way everything is wrapped in a promise, so I'll send another PR using [wd-sync](https://github.com/sebv/node-wd-sync).