cleanup for download_exec

Hi @dougsko

This pull request references https://github.com/rapid7/metasploit-framework/pull/1622 , it just does cleanup, feel free to review test and discuss anything, and once you agree with changes you can merge it into your repo and the original pull request will be automatically updated :)

Thanks!