generate.py line 60 implements the following logic: if filename_u.find("/") != -1:
which is supposed to match line 89: if filename_u.find("/") != -1 or file_dir == "":
But the implementations are different. Suggestion: Refactor code to have the same path.