fixed incorrect handling of -b option

try getenv(HOME) first before using getpwuid()