test_main: use sys.excepthook
improve exception handling; add spy.catcher
test_main: improve test_excepthook
spy.chain: index_start -> index_offset
spy/main: fix fragment indexes
add test_catcher