build script: switch branches and change permissions
Signed-off-by: Jean Francis Dominique S. Mabalot <jfdsmabalot@redhat.com>