Prevent `node-netpbm` from crashing on invalid JPEGs

The `jpegtopnm` command on invalid JPEGs can sometimes output `''`, i.e. silent error. Prevent this from crashing the script.

Please publish the changes to npm too. :)