Subversion: fix branch/tag extraction

That was broken for a long long long... time.
Should close #117, #237 and is an alternative to patch proposed by
@anthonygelibert in #264.