Fix lack of output for empty path part

Patch by Max Semenik. Bug 45343.

Change-Id: I9c7b47f307966dad6b7a33d582845df730831fee