lfs_generate_products: avoid IOError: image file is truncated

Jpeg samples should be opened in binary mode