Changed name of cached commit-id to subrepo.lastcommitid$(subdir) with some processing on subdir to ensure it is not rejected as a config key.
Fixed a bug where the cached commit-id wasn't being set (apparently --add was needed?).