New function prepends download directory to a filename,
or globs it if it contains a slash

This to be used by the file download feature.