Make dl.sh check for empty files; and robustify process to handle missing directories.