extopts: Corrected error retcode for get_extopts function.

Now returns -1 in case of parsing error.
extopts: Removed getopts dependency.