usage: tmpdir is an option
usage: correction
Script restructured in functions, call to make_dhm.py added.