Issue #2487429: Proper fix for base URL, https support and remove some drush_get_option() calls by using d() instead.