Only check errno if getpwuid() fails