Add --clear-empty feature.
Convert mod.py print statements to work with python 3.