Major bug fix.

Was not properly determining if cgminer was not running or running without API enabled.