Brooke, Larry, and Enno
Change mkdir to makedirs (creates intermediate paths)