Make checking for changes file more robust

Previous code failed if there were more than one .changes file.

Change-Id: Ibdf4585e15ad8ab124e77205f99cf3065cd2a56e