[dist] fix regression when detecting preconfigured mysql datadir (bnc#825956)