Test for datadir in /etc/my.cnf before adding a new line