Proposed fix for #1280

This PR proposes a fix for #1280, and #1676.

It is not ready to be merged, as I need a few more tests. 

Input for tests are very welcome.
On it will mess it up even further, since all the segments contain a trailing forward slash, so it will encode that forward slash and append another, unencoded forward slash

`artist/` => `artist%2f/` and so on