Cope if HOME is not set.
Merge bug 25920
stable to default