refactor implementaton of hook_ctools_plugin_directory by best practices

Refs. blinkreaction/drupal-variable-override#10