Remove test print statements and fix bugs reported by Lai

add_targets() did not check for duplicate target file paths.
delegate() did not check for duplicate delegations.
load_repository() did not fully load and update delegated roles.