Remove dependency on 'os/user', which cannot be used with CGO_ENABLED=0

... This allows running the tests without CGO.