Adds the optional settings for the download file function

Adds the ability to set the trustAllHosts and options settings for the download file function.