Refactored the creation of the brokers directory path whether in a project or not.