Tachyons, scalar fields and cosmology