Bug 3296: Better directory detection and msgs in factory tools
Merge branch 'branch_master_3296'