generate directory names correctly relatively from directories parameters