Fixed encoding of directories ending in .d or .i:
One .d and .i was mixed up, and string replace method doesn't work in-place.
+ hg clone http://localhost:20059/ copyrequesting all changesabort: error: Connection refused255ls: copy: No such file or directory+ hg clone http://localhost:20059/foo copy2requesting all changesabort: HTTP Error 404: File not found255