Create directories if they didn't exist.