Fixed automatic base path detection