Ensure that output lines are sorted.
Merge pull request #28 from edx/peter-fogg/sort-output-lines

Ensure that output lines are sorted.