Move generic btags functions into the btags script itself; if available, use current git branch when creating the path for the tags