While creating files, create folders specified by path if doesn't exist.