Real binary search

@bsoetaer 
The "-1" is because we include the median in the lower array instead of the upper array, since if the median is less than the target, it's no longer a candidate to be the first value greater than the index, but it is if it's not less than the target.