Update the `getDirection` method

Extends PR #216 and in reply to:
https://github.com/KnpLabs/KnpPaginatorBundle/pull/216#issuecomment-31745387