cmdmod: rm redundant check that CWD is a directory

We're already performing that check on new line # 329.