fix for very long filenames (255+ chars) on OS X (HFS+)