Refactor - separate file mode stuff out to core.go.

Minor bugfix in Cp implementation encountered during aforementioned
refactoring
Separate Prompt functions from commands to core.go

This makes a lot more sense in the context of the next commit
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
Goopt should be imported normally from the start.