Run tests on Travis and fix some compatibility issues

Poll handles do have a fileno method these days, maybe you can do an isinstance check instead?