Code to generate a JSON file hierarchy for jQuery UI's jsTree.