Add directory creation test and functionality.