Used std::advance and std::distance to calculate the output of rotate without random access iterators. This is not an optimal solution. Fixes #2.