Activation of 6-endo over 5-exo hydroxy epoxide openings. Stereoselective and ring selective synthesis of tetrahydrofuran and tetrahydropyran systems