Update tiff.py

Tiff write bug fixed (hopefully, haven't tested.).