Add allowed_exts option to get_extension