caa_download: added proper handling of the downloadDirectory flag for file links