Auto-detect project :directory slot from source file paths