Added buld_dirs() method and associated test. Added tear_down method as well.