Added mergeStatsWithValidation and writeToMergedFile tests

- context -> _this in data_generation/index.js and mergeFunctions
- utility_functions error throwing moved to messages