fix(generator): RangeException due to os-specific file separator on Windows