cmdutil: fix makefileobj not to clobber default modemap dict
Problem occurs if "hg cat -o" is invoked more than once in the same process.
The output of "hg cat" will be appended because of modemap[fn] = 'ab'.
shelve: make unshelve work even if it don't run in repository root
revertfiles are relative to the repository root. not paths relative to the cwd.
tests: move generaldelta test to inline python (
issue4064)