[helper files] Changed method to obtain the current branch to a more correct one