reimplemented percentile algorithm

Updated to depend on shoulda instead of thoughtbot-shoulda.  

There was a missed use case where the rank contained a fractional part, but rank.truncate returned a value equal to the length of the array.  According to the algorithm in this case, the last item should be returned as opposed to calculating the percentile (which was resulting in a non-existent index)