pdfdetach: Check for valid embedded file before trying to save it.

Closes #661
4 jobs for master in 11 minutes and 46 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #40706
build

00:09:11

passed #40707
build_clang_libcpp

00:09:06

passed #40708
build_gcc_49

00:11:46

passed #40709
build_mingw64_fedora

00:04:20