IANA Bash Guru but... Some tweaks needed to the /opt/utilities/bin/serialnumber script

IANA Bash Guru but...
Here's some tweaks that appear to fix the following issue with serialnumber:

/opt/utilities/bin/serialnumber
/opt/utilities/bin/serialnumber: line 11: local: can only be used in a function

Apologies that the merge may be munged, first pull request I've made on Github.
Standard disclaimer applies, works on my block ;)