empty basedirectories (empty string) lead to an array with a single element (empty string) which is uncorrect.