Fix wscript for jenerator version

Fix wscript to insert idl-version to sources of the clients and the servers.
And, in this patch I fixed `gen_version.sh` to use the branch name of HEAD. This is because when the HEAD of the branch proceed, the branch name of `jenerator` changes like `develop~1`.