Improve the get_version script

Make sure the script fails in case the version string is not found.