CompositeImage.HDRConfig:
- GetBasename returns unique name from a filename by merging the
basename and the name of the containing directory.
- ExpandPrefix: recognizes macro  ${dir} to add the last directory in
the path of the raw files.
TreeBuilder.py
- revert to hdr output index counting by directory
- use HDRConfig.GetBasename and HDRConfig.ExpandPrefix