[TO_STAGE] 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