Fix png image detection for ruby 2

Following on from the discussion on https://github.com/djberg96/ptools/issues/1 about binary detection, I've been trying to get `File.image?` working. I think the issue might be the default character encoding with Ruby 2.0.

I was testing with **ruby-2.0.0-p247**. Forcing the encoding like this feels a bit dirty, not sure of a better way though.