fix tests and get better stack traces in IE by using TK(err) in the wrap(). @sbezboro