Fix for cobra test for VPATH builds

Cobra test was failing for VPATH (out-of-source builds). This fixes that for me.