generator: Create a folder for each namespace

Generating bindings for libraries with several namespaces is likely to overwrite some files because there might be classes with same names in different namespaces. Creating a folder for each namespace makes up for a better structure and fixes the issue.