Fix handling of percentile calculations when there are two values.

Fixes a bug with percentile calculator that doesn't handle arrays with two values correctly.

According to http://en.wikipedia.org/wiki/Percentile#Alternative_methods
When N = 2 and P = 95,
n = (95/100)*(2-1)+1=1.95
so k = 1 and d = 0.95
meaning we should use the first value from the array for the k=1 case, not the 1 < k < N case of the function.