Fix IPv6 regular expression to not be greedy.  Combine a few cases, like
cygwin + win32.  Write tests for OS X (v4 & v6), Linux (v4 & v6), Win32
(v4).