Added tests for record insertion, including use of a child table.

Added code to allow for duplicate checks for entire records, still need to write tests for this.
Duplicate check test.

Bug in data output fixed as well.