Use value#to_i instead of Kernel#Integer() to coerce page number into integer.

Integer() is pickier than #to_i. `Integer("5/")` throws an exception, while `"5/".to_i` returns 5.