Fix parsing of CURRENT_BRANCH and empty string tests

Several commands were failing in my environment. This is just some cleanup that should be safe to run anywhere.