Fix for handling command with directory dependency