Create dir before creating file.