fix bug with --debug --verbose flags

Mistake with set_level vs setlevel fixed.
Added spec test to validate for situation.

Change-Id: I7d3448ca673dc25fc61309e6495e6dbfe76065f9