Fix bug in setext.

This would cause setext not to work right if the extention was not present beforehand, but a parent directory contained a dot.