Fixed cake core dir inclusion for cli
A lot of changes