Fix argument handling in gh-path helper.

No Issue
- Make helper behave as stated in description when variable
  number of arguments are passed in.
- Handle leading and trailing slashes when creating output
  url partial.
Merge pull request #4343 from jaswilli/gh-paths

Fix argument handling in gh-path helper.