Fix issue when author organizes dists in dirs
Refactors and test
Merge pull request #14 from ambs/fix-authordirs

Fix issue when author organizes dists in dirs