Use wrapper for getpwuid() to avoid crash

Based on crash logs this problem still exists on 10.8.2 <rdar://10261043>.