The exact penalty map for nonsmooth and nonconvex optimization