Bug 971460 - Refactor path_append/prepend to accept multiple elements

* Original code only supported single argument substitutions
* Update function declarations to match rest of file
* Add functional tests
* Fixed issue in Ruby cartridge where scl use was duping path elements
* Bumped Ruby cartridge version number
* Fixed CartridgeRepository to rebuild index correctly
Merge pull request #2785 from jwhonce/bug/971460

Merged by openshift-bot