Fix extension lookups on relative paths