Fix for opening jpeg files under Windows

Under Windows jpegs need to be opened and binary using "rb"