use GetDirs function in tools as much as possible to normalize command line flags