Update _class.paginate.php

Fixing a problem with no-parameter URLs dropping the filename from the URL.