In this commit, the testing framework used in dep is moved to the
test package, since it's used either in dep and main.
All the code that is not part of a command has been moved to the
dep subpackage, as well as all those functions that were shared between
dep and main, since dep cannot depend on main.
Because of the movement to another package, many structs, methods and
functions have become public.
Changes both name and implementation of renameElseCopy to reflect that
the outcome will be like a rename, even in the event of a cross-device
link error.