Added some recursive functions for git and directories.