Put all desired files in the directory specified in a tool XML as $output.files_path.
Example:
<command interpreter="python">script.py $input $output $output.files_path</command>
becomes:
python ./tools/filters/script.py ./database/files/dataset_1.dat ./database/files/dataset_2.dat ./database/tmp/dataset_2_files
Any file put in ./database/tmp/dataset_2_files will be accessable to html files using a relative link.
Directories are moved to a more permanent location only if they contain files.