Debug emulator

emulator_test_data.js: Contains a test harness for the emulator, as
well as one test case. More test cases should be added in the future.
emulator.js: _step() is an internal function that is essentially a copy
of the previous implementation of step(). The getTape() and getState()
methods are newly added.
tape.js: Fix syntax error.
tm.html: Include the test harness and testing data for now, should be
removed when the app is deployed.