Initial ProcessDirectoryInput implementation, along w/ significant

changes to ProcessInput, ManagedCmd, and CommandChain. Resolves #477.