merging sort functionality in stats
stats2 rewrite complete. removed dependence on numpy
added supports for directory flags