Fixing clang build.
Merge remote-tracking branch 'mine/MAID-365_FixUnittests' into MAID-365_FixUnittests
Correcting uid/gid bug. Tests now work in OS X
Merge remote-tracking branch 'mine/MAID-365_FixUnittests' into MAID-365_FixUnittests