cctools.py: use lockfile to when creating downloading files