This is part XIV of cmd engine rewrite.
It mainly tests and sets return code for a couple of directory related commands (CD, MKDIR/MD, PUSHD, DIR). It's on purpose that POPD isn't included in this MR: it will require (as RMDIR) some changes not directly related to command itself (more on next MR).