Updated to allow nested folders and symbolic links