Added OSX battery support

Borrowed code from duckpunch/osx-powerline-battery to add battery support when using powerline on OSX.