Add support for more complex SVN layouts

Normally you have REPO/project/trunk and REPO/project/tags/TAG. Sadly
SVN also allows strange things like REPO/trunk/project together with
REPO/tags/project/TAG. Support this by replacing trunk with tags and
appending the tag.
Add support for variables