test_iputil.py: fix and improve tests on Windows.
Test all platform variants (Unix, Windows, Cygwin) on each platform.

Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>