Make sure the parent directory exists.