Duality twists, orbifolds, and fluxes