This commit removes certain file-based functions from 'pkg/environment', continuing the migration to entirely remove the package.
This commit adds a new environment package that manages all calls to the underlying operating system.
This commit cleans up the package structure, to make two new top-level packages `internal` (for internal-use packages) and `pkg` (for general shared utility code).