Changed version script to use bash string manip