Cope if HOME is not set.
Merge bug 25920