Fix sandboxed console.log and tests

Mocha was not properly running the tests because the `done` function was not used. This caused the fact that `console.log` was undefined inside the sandbox to be overlooked.