downloader: set correct permissions on downloaded file