Modify to set a data directory.