close test file properly
use PIL directly instead via scipy