Added support for ruby >= 2.0

I noticed that some respond_to checks didn't work after upgrade to ruby 2.1. Turns out there [was a change to detect callable protected methods in ruby 2.0](http://tenderlovemaking.com/2012/09/07/protected-methods-and-ruby-2-0.html)

Also fixed a possible escaping of last quote in the generated salt strings
```
secret_token = 'Z(W....42_1\'
                           ^
```