Create the base directory if it doesn't exist.