This never worked right for non-root installs.

Puppet has a more idiomatic way to do this so let's use it!
Do absolutely everything as the non-root user.

This encodes a nasty assumption that the calling user, possibly via sudo, is the Homebrew non-root user.