added getopts to beginning of test.sh to allow turning on/off of debug macros