Fix libxsegmap generation.

Also remove obsolete directories.