Correctly create the path if missing, add missing import for shutil