Cache homedir between invocations.

The homedir of a user doesn't change anyway. Massively speeds up the
case where $HOME isn't set.

```
Before: BenchmarkDir    1000         2571286 ns/op
After:  BenchmarkDir    1000000000   2.77 ns/op
```

Repeatedly forking `sh` is slow, this commit causes it to only happen once.