adding checks to create parent directory path for each nested folder from the sources