Bugfix command line tool.
Better directory tests.