Hugh McMaster : regedit/tests: Use a helper function to write registry files.