extract: add support for udeb files
getops, im: cleanup
add lib: general functions