Adding uid and gid attributes.

No more, no less. Not based on PR #161, but takes a similar approach to the uid portion of it.