Safely handle a condition of no home directory

I've seen this pop up on oddly configured systems before.  This seems like a safe fix for those conditions.  If this patch seems like a good idea to anyone else, I'll write a spec/update the changelog for it before asking for merge.