bug2issue: Add github issue's closed state support

This patch adds "state = closed" for github issues.
This patch also fixes small errors in the getopt handlers.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>