Creating path of downloaded file if it doesn't exist

Creating path of downloaded file if it doesn't exist.

If you download a file to a non-existing location the download fails. This pull-request fixes that issue.