Recognize merge conflicts

Fail pre-emptively on merge conflicts, because they happen very often in Xcode projects due their nature, and the resulting error would depend on the position of the conflict marks.
This is leaking the file descriptor, it's never closed.