Fixed problems with user.add on Windows.

Fixes #4564