Fermi Large Area Telescope Study of Cosmic Rays and the Interstellar Medium in nearby Molecular Clouds