store: don't create dirs ending in period or space for hashed paths (
issue1417)
Windows won't create directories with names ending in period or space, so
we replace the last period/space character in truncated directory names of
hashed paths with some other character (underbar).
% file replaced with directory
adding a
% should fail - would corrupt dirstate
abort: file 'a' in dirstate clashes with 'a/a'
% directory replaced with file
adding a/a
% should fail - would corrupt dirstate
abort: directory 'a' already in dirstate
% directory replaced with file
adding b/c/d
% should fail - would corrupt dirstate
abort: directory 'b' already in dirstate