Avoid crashing on invalid or unreadable ELF core

Issue discovered during the GSoC 2014 project implementing FreeBSD
kernel support.  The existing elf-core Process plugin crashed trying
to read from /dev/mem (the kernel memory device).

Patch by Mike Ma.