Added merge_csv_history script

new version, after Jeff's code review comments.