preliminary mavericks support

Merge from an upstream boxen ahead of an official update in order to support OSX Mavericks and GH two factor auth. 

Lots of good stuff in here, including a fix for issue #7. Tested working on my MBP running 10.8.5