Simplified code in lib/jekyll/plugin.rb

Simplified code and bug fix in self.safe method