[duneproject,bugfix] Correctly escape variable in file creation.

A variable was not correctly escaped during creation of the file
cmake/modules/Makefile.am causing the error message:
"duneproject: line 914: datadir: command not found."

This patch now correctly escapes it.