Cosmic ray tests of double-gap resistive plate chambers for the CMS experiment