Fix problems with overlong directory names: phase #1