Fix bug in joining paths

Change-Id: Idc4ed9498780063143908c7d226a1454ae701350