Fixed bugs on Windows due to stdin and stdout opened in text mode instead of binary mode. Also fixed wrong type of data for file descriptor selection  (was dictionary instead of tuple).
Merge pull request #5 from syl20bnr/master

Some other fixes for Windows.