Hugh McMaster : reg/tests: Remove write_reg_file() and rewrite associated tests.