Fix change-version.sh

Cherry-pick from master.

- previously excluded any file contain log or war, rather than just .log and .war
- previously excluded any file with "." in a dir on its path, rather than just . at the start of dir name