Add os::path_env

Adds a platform-specific function, `path_env` to the `os` module. This
function can be used to parse the PATH environment variable according to
local platform conventions.

Closes #14352.