Fixes PNG Saving

Crops and reorders the bytes. As per previous discussion, consider dumping lodepng for something a little more comprehensive. Would also be good to write our own PNG saving.