Revert "Revert "Revert "Revert "Fix initialisation of object file directory.""""

This reverts commit 53c859f8a7742ac43c1ad0cfe395428e2614c691.