Use download module to download and extract files

Fixes #321.