Changed the logic to derive branch name with rev-parse
Added a test dir