Ensuring the directory exists.