fix version command so that it will work with all supported config formats and added tests