Change. splitext(".pwd") returns `.pwd` as root instead of extension.