Flip the image in read_pixels and test read_pixels

- In read_pixels, the result image is upside-down. Flip the image using `[::-1]`.
- Unit test for read_pixels: Draw a white square on top left, check sums of pixels in corners to compare result.

You don't actually have to call this here, because the context handler (`with` syntax) does it for you.