Properly set directory.