fixed bug in checking file name length preventing files in deep
directory structures