Use Twisted which function instead of relying on OS in test runner. Fixes #62.

Reviewed in https://codereview.appspot.com/8893044/