Sort output.
Strip CR.
Add test.
Add basic test cases.
Keep option order of -c and -s (close gh-1).
Add --max,--min and --avg options (close gh-2).