Fix a bug where create_or_update_file was not using the correct base commit on a branch