cmdmod: rm redundant check that CWD is a directory

already performing that check on new line # 329