[bin][extractModule] Support nested path and check if subdir

latest merge request