Add utils/write-tests.py and refactor test_disassemblies.py