make cfg-generator work on linux and fix curdir for dynagen