Fix dependencies between test programs and datafiles

Apparently, DEPENDS can only be used between file-level dependencies
and not target-level dependencies. add_dependencies must be used for
that.