Remove assumptions about dev/sys/proc. Allow empty pkgs (harder than I expected!).