fix off-by-one error in rest api range calculations, fixes #124
fix off-by-one error in rest api range calculations, fixes #124

It is e.g. "0-999/1000" (begin-end/total), so end can have total-1 as
its maximum value.

bepasty/bepasty-server,bepasty/bepasty-server,bepasty/bepasty-server,bepasty/bepasty-server