Libtiff save in io.BytesIO

Minor changes to PR #1011.

* Moved test to different file, used standard test image instead of blank F mode image. 
* Hoisted imports.