updated test runner so directly runnable in browsers

http://jsbin.com/AxaxOlU/1/edit?js,console