Extract check for conflicts in PlistHelper#file_in_conflict?

Fix leaking file descriptor.