Fix greyscale PIL images

Slice off the channel for greyscale images
Add test for this as well

Fixes #388