fixes #6 - unexpected io.EOF for short image files