Refactor and code cleanup

* Use subprocess instead of system
* Abstract wget, installpkg, removepkg
* Simplify _get() to accept a full url rather than a path