Function createFileAndFolderIfDoesntExist

Ensures that all folders and the file exist at the provided file path. If the file doesn't exist, it will be created along with any necessary directories.