Decouple download.js (CLI) from download.sh (bash wrapper)

Fixes #7