A nodejs module: Write a file and create the directories found in its path if needed.