Fix 'path' function: use main's file as project root