fixes a bug in create_file_structure where it wasn't correctly figuring out depth in certain instances