[jpegio] clarify and comment the reading code and handle the case of an expanding file.