backport support for Gemfile.d and routes.d plugin mechanisms

This is required for the Cisco UCS barclamp.

Fixes https://bugzilla.novell.com/show_bug.cgi?id=835514

(cherry-picked from bc4fd5cd on master)