Create $datadir only if there are no variables

Attached patch creates $datadir only if there are no variables in path (typically %{::environment}).