Axions and the graceful exit problem in string cosmology