Remove excessive IO.select
Add mocha to Gemfile
Merge upstream changes