python script which generates a json representation of the filesystem