Use drupal_is_cli() to determine environment