merge-recursive: Introduce a merge_file convenience function