Superpotentials from singular divisors