beegetopt: free memory before exiting

beegetopt is leaking memory if BEE_GETOPT_ERROR occurs

the variables beeopts and beeoptptr are now freed before exiting