import pwd fails under Jython on Windows

The module pwd is designed to fail under Microsoft Windows and should be avoided.  The detection code fails under Jython where the platform is Java.  I copied the detection code from pwd; maybe we should just try pwd and handle the exception accordingly instead.