Adding save function to RecordArray
Adding tests and fixing edge case.
Adding test file