Bug 971460 - Refactor path_append/prepend to accept multiple elements

* Added dedup'ing functional tests