Fix compilation of Python bindings for named build directories (#6244)
In current master, the following fails whenever <name> contains a /:
./configure.sh --python-bindings --name=<name>
The reason is that src/api/python/genkinds.py adds a directory to the python path while relying on the fact that the build directory is located directly under the main repo directory, which is not the case if <name> contains a /.
This PR fixes this by having cmake determine the right directory to add to the python path.