Fix CLI mode detection for some shared hosts.
Use Request helper to determine whether we're in CLI mode.
Merge pull request #1212 from franzliedke/patch-46

Fix CLI mode detection for some shared hosts.