This script reads the contents of the given folder and saves the file/directory names into a tree to manipulate.
For example, a folder containing the following:
folder1/ folder2/ file1 file2
would be organised like so:
main = [folder1: folder, folder2: folder, file1: file, file2: file]