cmd/tests: Add dir built-in command test.