Replaced binary search in find_common_prefix()

A binary search in this location makes no sense, since it built upon string comparisons for each iteration. The "new" algorithm only compares each byte once.