Refactored validation for
-dir
-cd