Added sortFunction option to sort posts. Fixes #11