After using the 'Xcode/Import Frontmost Project' command, for commands in the newly imported project TM_PROJECT_DIRECTORY is set to '/'. I think that is an unfortunate choice. If for whatever reason it can not be set to the 'real' project directory, I think it should either not be defined at all or empty.
Gerd