fix extension and leading dots