make-changelog.pl: use a cache directory, improve bug number detection