[Fix] extensions
: handle .
and ..
properly
#2778
+55
−1
Merged