Add underscore.py, and use flatten/groupBy.
A basic test for the new main script.