fix sampleName generation for older directory structures