Bug 3296: Better directory detection and msgs in factory tools