ws: Don't use getpwnam() directly, not thread-safe

Fixes #479