Projective dimension and regularity of path ideals of cycles