Finish code to generate test precinct file.