I have a list of paths, some of which don\'t have any subdirectories, and some do, like so:
foo bar/foo baz/burr/ham
I want to return a list