Centralize the definition of ``$platform``.
Stop testing for existence when we know that it should exist.
Setup paths into the user area, and source an environment script.

The environment script will get sourced in both the interactive and
non-interactive case.