Test refactorings, small code cleanups.

Move some tests to test-instrument, add simple sanity checking tests.
Provide a default filename to `instrument` so that it's easier to use from repl