Add current Ruby globals.

Allows access to the Ruby path. Needed for Linux
porting.
Add with_system_path to run using system PATHs.

Needed for Linux compatibility.
Don't run certain functions on non-MACOS.
Portability fixes to run Homebrew on Linux systems

Closes #16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>