Construction of nonsingular pre-big-bang and ekpyrotic cosmologies and the resulting density perturbations | Synapse