Fix version files reading in Makefile