fix panic with wrong dockercfg file

Fixes #2030 

ping @dhrp @creack @crosbymichael