HDFS-7132. hdfs namenode -metadataVersion command does not honor configured name dirs. Contributed by Charles Lamb.

(cherry picked from commit f48686a1ad81823000534665a76264bba51182f4)