Fix greyscale PIL images

Slice off the channel for greyscale images
Add test for this as well
Merge branch 'master' into pil_fix
Merge pull request #406 from patricksnape/pil_fix

Fix greyscale PIL images