[bugfix] Improve duneproject.

Fix generated config.cmake.in which contained a surplus endif.
List CMakeLists.txt and other files to be included in tarballs.
Move generated files around to sort them by directory.