Set up dirs first.