Handle deep dependencies

Should solve https://github.com/eugeneware/debowerify/issues/10

I can work on a test if there's interest to merge it.