Bugfix so pdfinfo will not crash if file passed to it is not a PDF

A little defensive coding so that non-PDF files won't crash node.