[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.
(cherry picked from commit af0401cc08ca84be2ca5398d65b5ab1a991ea823)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>