Update version change script

support package.json, improved output and error checking