fixed flipped image, added export tif

the transpose was missing in the part where we convert to raster. i
added it and also fixed a few other small things. I also added the write
out to tiff as that is a useful skill if they want to write out the
NDVI.