Add support for directory sorting with optional parameter.  default/undefined behavior is no sort.
Merge pull request #98 from childsb/bz1066366

Add support for directory sorting with optional parameter.