Added ability to download direct to memory.
Added ability to download a file directly with passed in parameters and unit tests.