Fix #54, again..
repo_basename handled some invalid URLs, also: some testcases were wrong