Improve `_exec` and its test coverage

I've improved [the code](https://github.com/wymeditor/wymeditor/pull/632/files#diff-e3fd845050e592f2118ad070087e1ecfR572) but I would rather have a real Safari browser to work with. I don't want to delay this for Safari, though.

My next computer will have more RAM so I'll get an OS X VM set up in it for Safari testing.

In the meanwhile.