Merge r244451 from head (originally by pjd):
  Use correct file permissions when looking for available core file if
  kern.corefile contains %I.

Discussed with:	pjd (some time ago)
Approved by:	re (kib)