fix update-copyright script bugs

- /bin/bash is just bogus
- [[ is not portable
- use mktemp instead of $RANDOM
- find could not possibly have worked
- use gsed instead of sed even instead of fixing the non-portable
  features