Re-implemented carton check

Introduced Dist::Core to represent core modules in Lock.
Exit code represents the errors thrown from commands.