Always use compat.BufferIO in pil_engine.

Have changed couple of lines in PIL engine for consequent usage of BufferIO wrapper from compat.py module.