Move recursing over directories into core.go

Also, moves the Stat function in Cp into core.go.
Previous changes also make more sense in the context of this commit