Modified to use UTF-8 encoding. (Works with Ruby 2.0)

- Set encoding of strings to be UTF-8 and force encodings when making string comparisons.
- Updated ruby version check for 2.0
- Fixed deprecated warnings
- Fixed test for OSX version of git
- Tested on 1.9.3-p194 and 2.0.0