Fix shrink and prune, refactor utils

shrinkwrap and prune had problems with symlinked components

differences with npm shrinkwrap are explained in readme