Add "getDirection"

This allow to get the sort direction from template.
It's useful to display the correct arrow.

Let me know if you want that I change documentation.
Merge pull request #216 from sroze/patch-1

Add "getDirection"