Fixes and unit tests for the working directory upgrade step
Merge remote-tracking branch 'upstream/jdob-v1-upgrade' into jdob-v1-upgrade