Update PpmImagePlugin.py

Bug fix for encoding of b_whitespace
Update PpmImagePlugin.py

Bug fix when locale has not been set
Update PpmImagePlugin.py

Making it work for Python 3.x
Merge pull request #346 from mhogg/master

Bug fix for encoding of b_whitespace - Similar to closed issue #272