Minor typos and OS X fixes

With few minor changes I was able to use this plugin on OS X. I've also fixed some typos in code and rewritten readme and comments a little bit