download file accepts directory as 2nd param. closes #1