Don't install dependencies recursively.
Refactor pkg_deps() out of install_deps().
Closes #369