Well, maybe there is some confusion here.
dirpath%() return the path of the local file you are working on when running PlantUML locally (that is, from a local file system).
We should probably update the documentation about it.
When you are using PlantUML in cloud/internet context, the underlying library cannot exactly guess who is calling it.
So right now, you have to hardcoded the URL in your diagram.
However, your question makes sense.
I understand that you would like to be able to retrieve "https://raw.githubusercontent.com/ClicketyClickDK/sandbox/master/plantuml/include" somehow.
So we have to think about it, and to see if we could extend the behaviour of dirpath%() in some way.
However, the difficult part is the impact on tools that are linked with the PlantUML core library. This is because it will be the responsability of those tools to push the exact value of this context/dirpath string. So we have to find a clever way to do this transparently.
We'll keep you informed...