Fixed issue with downloading files
- only create output directory for download file if this directory does not exist already.