Refactor buildlet library download code. Fixes #20