expand_path is not implemented consistently across platforms and
sessions, which leads to confusing behavior. In places where we have trivial
single variable expansions, this changes modules and library code to just use
We'll look at the rest individually to see if they can also be reimplemented in
terms of getenv.