Fixed library detection in directories with dashes