Add return value to extract method
Remove reference to $! on system call failure

This change is to avoid error like: "Inappropriate ioctl for device"
caused by referencing $ERRNO on system() call failure.